/**
 * @file myattention/Home.js
 *  我的关注
 * @author
 */
 import React, {Component,PropTypes} from 'react';
 import {connect} from 'dva';
 import {routerRedux,Link,withRouter } from 'dva/router';
 import { Row,Col,Table,Button} from 'antd';
 import Tabtitle from '../../../components/common/TabTitle';
 import ToolBar from './component/ToolBar';
 import FilterTable from '../component/filterTable';

 import style from './home.less';
/**
 * [MyAttention description]
 * @param {[type]} tag [所属model]}
 * @param {[type]} GroupList [分组下拉数据]}
 * @param {[type]} groupName [分组名称]}
 * @param {[type]} groupNumber [分组编号]}
 */


const MyAttention = ({dispatch,myattention,location:{pathname,query}}) => {
  if(myattention.GroupStatus){
    const {
      GroupList,
      groupName,
      groupNumber,
      edit,
      GroupStatus,
      filterProduct,
      username,
      isPublic,
      MAcolumnKpi,
      selectedRowKeys
    } = myattention
    console.log("myattentionhome>>>>>>",myattention);
    const tag = "myattention";
    return (
      <div>
        <Tabtitle value={'我的关注'}/>
        <div className="page-myattention-home content-inner">
          <Row>
            <ToolBar
              tag={tag}
              data={GroupList}
              groupName={groupName}
              groupNumber={groupNumber}
              edit={edit}
              username={username}
              isPublic={isPublic}
              filterProduct={filterProduct}
            />
          </Row>
          <hr style={{marginTop:8,marginBottom:8}}/>
          <FilterTable
            GroupStatus={GroupStatus}
            groupNumber={groupNumber}
            username={username}
            filterProduct={filterProduct}
            tag={tag}
            MAcolumnKpi={MAcolumnKpi}
            selectedRowKeys={selectedRowKeys}
          />
        </div>
      </div>
    )
  }else{
    return null;
  }

}

MyAttention.propTypes = {}

export default connect(({myattention})=>({myattention}))(MyAttention)
